import pickle
import os
import pdb

output_dir = '/home/wjh/Meta_R-CNN/output/res101/voc_2007_test/models_40'

cls_list = ['aeroplane',
'bicycle',
'boat',
'bottle',
'car',
'cat',
'chair',
'diningtable',
'dog',
'horse',
'person',
'pottedplant',
'sheep',
'train',
'tvmonitor',
'bird',
'bus',
'cow',
'motorbike',
'sofa']

for cls in cls_list:
    with open(os.path.join(output_dir, cls + '_pr.pkl'), 'rb') as f:
        data = pickle.load(f)
        pdb.set_trace()
        recall = data['rec'][data['prec'] > 0.5][-1]